package com.xsomnus.open.im.authv2.codec;

import com.xsomnus.open.im.protocol.codec.PacketCodec;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;

import java.util.List;

/**
 * @author @xsomnus666_xiawenye★
 * @since 2019/4/25 0025 15:31
 * 当你发现自己的才华撑不起野心时，就请安静下来学习吧
 */
public class PacketDecoder extends ByteToMessageDecoder {
    @Override
    protected void decode(ChannelHandlerContext ctx, ByteBuf in, List out) throws Exception {
        out.add(PacketCodec.INSTANCE.decode(in));
    }
}
